package system.student.entity.user;


public class Teacher {
    private Long id;
    private UserInfo userInfo;
    private String name;
    private String department;
    private Long userId;



    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public Teacher(UserInfo userInfo, String name, String department) {
        this.userInfo = userInfo;
        this.name = name;
        this.department = department;
    }



    public Teacher() {
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    @Override
    public String toString() {
        return String.format("| %-15s | %-10s | %-15s | %-15s |",
                name, department,
                userInfo != null ? userInfo.getUsername() : "N/A",
                userInfo != null ? userInfo.getPhone() : "N/A");
    }
}
